<%@ page language="java" contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://www.rapid-framework.org.cn/rapid" prefix="rapid" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<rapid:override name="frame-header-style">
    <style type="text/css">
        .layui-table-cell {
            height: auto;
            overflow: visible;
            text-overflow: inherit;
        }
    </style>
</rapid:override>

<rapid:override name="frame-content">
    <blockquote class="layui-elem-quote">
        <span class="layui-breadcrumb" lay-separator="/">
          <a href="/admin">首页</a>
          <a><cite>页面列表</cite></a>
        </span>
    </blockquote>
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>页面列表</legend>
    </fieldset>
    <form id="pageForm" method="post">
        <table class="layui-table">
            <colgroup>
                <col width="50">
                <col width="50">
                <col width="100">
                <col width="200px">
                <col width="50">
                <col width="100">
            </colgroup>
            <thead>
            <tr>
                <th>id</th>
                <th>key</th>
                <th>标题</th>
                <th>内容</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <c:forEach var="p" items="${pageList}">
            <tr>
                <td>${p.pageId}</td>
                <td>${p.pageKey}</td>
                <td>${p.pageTitle}</td>
                <td>
                    <div title="${p.pageContent}" style="
                        width:300px;
                        overflow:hidden;
                        text-overflow:ellipsis;
                        white-space:nowrap;
                        ">${p.pageContent}</div>
                </td>
                <td>
                    <c:if test="${p.pageStatus==1}">显示</c:if>
                    <c:if test="${p.pageStatus!=1}">隐藏</c:if>
                </td>
                <td>
                    <a href="page/edit/${p.pageId}" class="layui-btn layui-btn-mini">编辑</a>
                    <a href="page/delete/${p.pageId}"
                       class="layui-btn layui-btn-danger layui-btn-mini" onclick="return confirmDelete()">删除</a>
                </td>
            </tr>
            </c:forEach>
            </tbody>
        </table>
    </form>
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>自定义页面</legend>
    </fieldset>
    <div class="layui-form">
        <table class="layui-table" style="width: 40%;">
            <colgroup>
                <col width="150">
                <col width="150">
                <col width="200">
                <col>
            </colgroup>
            <thead>
            <tr>
                <th>别名</th>
                <th>标题</th>
                <th>内容</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>map</td>
                <td>站点地图</td>
                <td><a href="/map" target="_blank">点击查看</a></td>
            </tr>
            <tr>
                <td>articleFile</td>
                <td>文章归档</td>
                <td><a href="/articleFile" target="_blank">点击查看</a></td>
            </tr>
            <tr>
                <td>message</td>
                <td>留言板</td>
                <td><a href="/message" target="_blank">点击查看</a></td>
            </tr>
            <tr>
                <td>applyLink</td>
                <td>申请友链</td>
                <td><a href="/applyLink" target="_blank">点击查看</a></td>
            </tr>
            </tbody>
        </table>
    </div>

    <blockquote class="layui-elem-quote layui-quote-nm">
        温馨提示： <br>
        1、自定义的页面，无法删除，别名已写入控制器
    </blockquote>
</rapid:override>

<%@include file="../framework.jsp"%>